Skip to content

Let a range filter render pre-counted histogram buckets - #132

Open
einari wants to merge 3 commits into
mainfrom
feature/server-driven-histogram-buckets
Open

Let a range filter render pre-counted histogram buckets#132
einari wants to merge 3 commits into
mainfrom
feature/server-driven-histogram-buckets

Conversation

@einari

@einari einari commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Added

  • numericRange.histogram on a filter definition, and a matching histogram prop on RangeHistogramFilter, for rendering buckets that were counted elsewhere — a server aggregating over more rows than are worth sending to the browser, for instance
  • buildHistogram and the HistogramBucket type are exported from @cratis/components/Filter

Changed

  • numericRange.values is now optional, since a range filter can be driven by pre-counted buckets instead. Supplying values behaves exactly as before

einari and others added 3 commits August 10, 2026 16:55
The reveal is a clip-path wipe, so the clip has to exist while it animates —
clip-path: none is discrete and snaps instead of interpolating. But clip-path
clips every descendant, so leaving a zero inset in place after the wipe has
landed slices off the hover tooltips of the outermost buttons, which paint
outside the panel by design.

Widening the settled inset is not a way out: the wipe front IS the inset
travelling 100% -> 0, so bleeding it outward extends the travel and the reveal
completes early (measured at ~95ms of a 350ms transition with a 32rem bleed).

Release the clip once the reveal has landed instead, and put an interpolable
inset back before a close begins, so both wipes keep their exact timing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
.toolbar-slot-section was permanently overflow:hidden, which clipped the
fan-out and folder panels of any ToolbarGroup that hosts a slot. ToolbarLayout
already worked around this with an inline overflow override; move that to a
--transitioning modifier class so both hosts share it and the section is only
clipped while outgoing content is fading out.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
RangeHistogramFilter could only count values the browser already held, so a
range picker over a data set larger than the loaded page misrepresented what
each range actually selects - and there was no way to feed it a server-side
aggregation.

numericRange now takes an optional histogram of pre-counted buckets, rendered
as given and scaled against their own tallest bar. The counting itself moves
out of the component into buildHistogram so both paths are covered by specs.

values stays supported and unchanged for client-side counting.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@einari einari added the minor label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant